Skip to content

fix(macos): align custom theme output with runtime schema - #284

Open
rwang23 wants to merge 1 commit into
Fei-Away:mainfrom
rwang23:agent/audit-macos-theme-writer-contract
Open

fix(macos): align custom theme output with runtime schema#284
rwang23 wants to merge 1 commit into
Fei-Away:mainfrom
rwang23:agent/audit-macos-theme-writer-contract

Conversation

@rwang23

@rwang23 rwang23 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary / 摘要

  • Align write-theme.mjs with the runtime loader's 120-code-point limits.
  • Allow the documented art.taskMode=full value and lock the writer-to-loader contract with a regression test.

Type / 类型

  • Bug fix / 缺陷修复
  • Feature / 新功能
  • Docs / 文档
  • Theme / CSS / visual / 主题或视觉
  • Scripts / install / restore / 脚本或安装恢复
  • Chore / 杂项

Platform / 平台

  • macOS
  • Windows
  • Both / 双平台
  • Docs / repo only / 仅文档或仓库元数据

Self-check / 自测

macOS (when code under macos/ changes)

  • macos/tests/run-tests.sh passed / 已通过
  • Doctor (optional): macos/scripts/doctor-macos.sh
  • Live verify (if inject/CSS/start path): verify-dream-skin-macos.sh or Desktop Verify
  • Restore / re-apply smoke (if install/restore/start changed) / 若改了安装恢复再应用

User-facing / 用户可见变更

  • Updated macos/CHANGELOG.md (and macos/VERSION if release-worthy) / 已更新 changelog(发版时再 bump VERSION)
  • N/A — no user-facing change / 无用户可见变更

Security / 安全

  • Does not modify official Codex install / asar / signatures / 未修改官方安装与签名
  • Does not silently write API Base URL or keys / 未静默写入 API Base URL 或 Key
  • CDP remains loopback-oriented (127.0.0.1) where applicable / CDP 仍仅本机回环(如适用)

Notes / 补充

The writer accepted a 160-code-point tagline, only 80 code points of quote text,
and rejected full, while the runtime accepted a 120/120/full contract.

Validated on main@611c101 with:

  • node --check macos/scripts/write-theme.mjs — passed
  • node --test macos/tests/write-theme-contract.test.mjs — passed
  • git diff --check — passed

The added test writes a theme, reads its JSON, and loads it through the runtime.
macOS Desktop verification, Doctor, Swift/Xcode coverage, and a full macOS host
suite remain CI or device gates.

Tracking issue / 追踪 Issue

Closes #295

@rwang23
rwang23 marked this pull request as ready for review July 27, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][macOS]: Keep custom-theme writer compatible with runtime schema

1 participant